.class public Lcom/netease/newsreader/activity/MyApplication;
.super Landroid/app/Application;
.source "MyApplication.java"


# static fields
.field public static isDownPic:Z


# instance fields
.field private db:Landroid/database/sqlite/SQLiteDatabase;

.field private docIDListMap4Head:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

.field private docIDListMap4NonHead:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

.field private docIDListMap4Topic:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

.field private goHome:Ljava/lang/String;

.field private isCacleOfflineDown:Z

.field private isCustomColumnFinish:Z

.field private isDownOffline:Z

.field private isExit:Z

.field private isOfflineDownFinish:Z

.field private keyback:Z

.field private lastdocid:Ljava/lang/String;

.field private pushIntent:Landroid/content/Intent;

.field private set_prefs:Landroid/content/SharedPreferences;

.field private sqlOpenHelper:Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;

.field private voteId:Ljava/lang/String;

.field private voteItemTime:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 60
    const/4 v0, 0x1

    sput-boolean v0, Lcom/netease/newsreader/activity/MyApplication;->isDownPic:Z

    .line 16
    return-void
.end method

.method public constructor <init>()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 16
    invoke-direct {p0}, Landroid/app/Application;-><init>()V

    .line 29
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4Head:Ljava/util/HashMap;

    .line 30
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4NonHead:Ljava/util/HashMap;

    .line 31
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4Topic:Ljava/util/HashMap;

    .line 37
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/netease/newsreader/activity/MyApplication;->isExit:Z

    .line 38
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->lastdocid:Ljava/lang/String;

    .line 41
    iput-boolean v1, p0, Lcom/netease/newsreader/activity/MyApplication;->isCacleOfflineDown:Z

    .line 42
    iput-boolean v1, p0, Lcom/netease/newsreader/activity/MyApplication;->isDownOffline:Z

    .line 43
    iput-boolean v1, p0, Lcom/netease/newsreader/activity/MyApplication;->isOfflineDownFinish:Z

    .line 44
    iput-boolean v1, p0, Lcom/netease/newsreader/activity/MyApplication;->isCustomColumnFinish:Z

    .line 47
    iput-boolean v1, p0, Lcom/netease/newsreader/activity/MyApplication;->keyback:Z

    .line 16
    return-void
.end method


# virtual methods
.method public getDocIdListMap(I)Ljava/util/HashMap;
    .locals 1
    .parameter "type"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I)",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 126
    packed-switch p1, :pswitch_data_0

    .line 134
    const/4 v0, 0x0

    :goto_0
    return-object v0

    .line 128
    :pswitch_0
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4Head:Ljava/util/HashMap;

    goto :goto_0

    .line 130
    :pswitch_1
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4NonHead:Ljava/util/HashMap;

    goto :goto_0

    .line 132
    :pswitch_2
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4Topic:Ljava/util/HashMap;

    goto :goto_0

    .line 126
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public getGoHome()Ljava/lang/String;
    .locals 1

    .prologue
    .line 63
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->goHome:Ljava/lang/String;

    return-object v0
.end method

.method public getIsCancleOfflineDown()Z
    .locals 1

    .prologue
    .line 169
    iget-boolean v0, p0, Lcom/netease/newsreader/activity/MyApplication;->isCacleOfflineDown:Z

    return v0
.end method

.method public getIsCustomColumnFinish()Z
    .locals 1

    .prologue
    .line 193
    iget-boolean v0, p0, Lcom/netease/newsreader/activity/MyApplication;->isCustomColumnFinish:Z

    return v0
.end method

.method public getIsDownOffline()Z
    .locals 1

    .prologue
    .line 177
    iget-boolean v0, p0, Lcom/netease/newsreader/activity/MyApplication;->isDownOffline:Z

    return v0
.end method

.method public getIsOfflineDownFinish()Z
    .locals 1

    .prologue
    .line 185
    iget-boolean v0, p0, Lcom/netease/newsreader/activity/MyApplication;->isOfflineDownFinish:Z

    return v0
.end method

.method public getLastdocid()Ljava/lang/String;
    .locals 1

    .prologue
    .line 71
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->lastdocid:Ljava/lang/String;

    return-object v0
.end method

.method public getNewsSQLiteOpenHelper()Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;
    .locals 1

    .prologue
    .line 118
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->sqlOpenHelper:Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;

    return-object v0
.end method

.method public getPushIntent()Landroid/content/Intent;
    .locals 1

    .prologue
    .line 57
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->pushIntent:Landroid/content/Intent;

    return-object v0
.end method

.method public getSQLiteDatabase()Landroid/database/sqlite/SQLiteDatabase;
    .locals 1

    .prologue
    .line 122
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->db:Landroid/database/sqlite/SQLiteDatabase;

    return-object v0
.end method

.method public getVoteId()Ljava/lang/String;
    .locals 1

    .prologue
    .line 161
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->voteId:Ljava/lang/String;

    return-object v0
.end method

.method public initDB()V
    .locals 2

    .prologue
    .line 113
    new-instance v0, Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;

    invoke-virtual {p0}, Lcom/netease/newsreader/activity/MyApplication;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->sqlOpenHelper:Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;

    .line 114
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->sqlOpenHelper:Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;

    invoke-virtual {v0}, Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    iput-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->db:Landroid/database/sqlite/SQLiteDatabase;

    .line 115
    return-void
.end method

.method public isExit()Z
    .locals 1

    .prologue
    .line 79
    iget-boolean v0, p0, Lcom/netease/newsreader/activity/MyApplication;->isExit:Z

    return v0
.end method

.method public isKeyback()Z
    .locals 1

    .prologue
    .line 50
    iget-boolean v0, p0, Lcom/netease/newsreader/activity/MyApplication;->keyback:Z

    return v0
.end method

.method public onCreate()V
    .locals 4

    .prologue
    .line 89
    invoke-super {p0}, Landroid/app/Application;->onCreate()V

    .line 90
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/MyApplication;->initDB()V

    .line 91
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v1

    iput-object v1, p0, Lcom/netease/newsreader/activity/MyApplication;->set_prefs:Landroid/content/SharedPreferences;

    .line 92
    iget-object v1, p0, Lcom/netease/newsreader/activity/MyApplication;->set_prefs:Landroid/content/SharedPreferences;

    const-string v2, "autopost"

    const/4 v3, 0x1

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    .line 93
    .local v0, autopost:Z
    if-eqz v0, :cond_0

    .line 94
    new-instance v1, Landroid/content/Intent;

    const-class v2, Lcom/netease/newsreader/service/MsgPushService;

    invoke-direct {v1, p0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    iput-object v1, p0, Lcom/netease/newsreader/activity/MyApplication;->pushIntent:Landroid/content/Intent;

    .line 95
    iget-object v1, p0, Lcom/netease/newsreader/activity/MyApplication;->pushIntent:Landroid/content/Intent;

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/activity/MyApplication;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    .line 98
    :cond_0
    return-void
.end method

.method public onTerminate()V
    .locals 1

    .prologue
    .line 103
    invoke-super {p0}, Landroid/app/Application;->onTerminate()V

    .line 104
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->db:Landroid/database/sqlite/SQLiteDatabase;

    if-eqz v0, :cond_0

    .line 105
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->db:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 107
    :cond_0
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->sqlOpenHelper:Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;

    if-eqz v0, :cond_1

    .line 108
    iget-object v0, p0, Lcom/netease/newsreader/activity/MyApplication;->sqlOpenHelper:Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;

    invoke-virtual {v0}, Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;->close()V

    .line 110
    :cond_1
    return-void
.end method

.method public setDb(Landroid/database/sqlite/SQLiteDatabase;)V
    .locals 0
    .parameter "db"

    .prologue
    .line 26
    iput-object p1, p0, Lcom/netease/newsreader/activity/MyApplication;->db:Landroid/database/sqlite/SQLiteDatabase;

    .line 27
    return-void
.end method

.method public setDocIdListMap(ILjava/lang/String;Ljava/lang/Object;Ljava/lang/String;)V
    .locals 2
    .parameter "type"
    .parameter "key"
    .parameter "o"
    .parameter "columnId"

    .prologue
    .line 138
    packed-switch p1, :pswitch_data_0

    .line 154
    :goto_0
    return-void

    .line 140
    :pswitch_0
    iget-object v1, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4Head:Ljava/util/HashMap;

    invoke-virtual {v1, p2, p3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_0

    .line 143
    :pswitch_1
    iget-object v1, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4NonHead:Ljava/util/HashMap;

    invoke-virtual {v1, p4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    if-nez v1, :cond_0

    .line 144
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 145
    .local v0, map:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Object;>;"
    iget-object v1, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4NonHead:Ljava/util/HashMap;

    invoke-virtual {v1, p4, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 147
    .end local v0           #map:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Object;>;"
    :cond_0
    iget-object v1, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4NonHead:Ljava/util/HashMap;

    invoke-virtual {v1, p4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/HashMap;

    invoke-virtual {v1, p2, p3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_0

    .line 150
    :pswitch_2
    iget-object v1, p0, Lcom/netease/newsreader/activity/MyApplication;->docIDListMap4Topic:Ljava/util/HashMap;

    invoke-virtual {v1, p2, p3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_0

    .line 138
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public setExit(Z)V
    .locals 0
    .parameter "isExit"

    .prologue
    .line 83
    iput-boolean p1, p0, Lcom/netease/newsreader/activity/MyApplication;->isExit:Z

    .line 84
    return-void
.end method

.method public setGoHome(Ljava/lang/String;)V
    .locals 0
    .parameter "goHome"

    .prologue
    .line 67
    iput-object p1, p0, Lcom/netease/newsreader/activity/MyApplication;->goHome:Ljava/lang/String;

    .line 68
    return-void
.end method

.method public setIsCancleOfflineDown(Z)V
    .locals 0
    .parameter "status"

    .prologue
    .line 165
    iput-boolean p1, p0, Lcom/netease/newsreader/activity/MyApplication;->isCacleOfflineDown:Z

    .line 166
    return-void
.end method

.method public setIsCustomColumnFinish(Z)V
    .locals 0
    .parameter "status"

    .prologue
    .line 189
    iput-boolean p1, p0, Lcom/netease/newsreader/activity/MyApplication;->isCustomColumnFinish:Z

    .line 190
    return-void
.end method

.method public setIsDownOffline(Z)V
    .locals 0
    .parameter "status"

    .prologue
    .line 173
    iput-boolean p1, p0, Lcom/netease/newsreader/activity/MyApplication;->isDownOffline:Z

    .line 174
    return-void
.end method

.method public setIsOfflineDownFinish(Z)V
    .locals 0
    .parameter "status"

    .prologue
    .line 181
    iput-boolean p1, p0, Lcom/netease/newsreader/activity/MyApplication;->isOfflineDownFinish:Z

    .line 182
    return-void
.end method

.method public setKeyback(Z)V
    .locals 0
    .parameter "keyback"

    .prologue
    .line 54
    iput-boolean p1, p0, Lcom/netease/newsreader/activity/MyApplication;->keyback:Z

    .line 55
    return-void
.end method

.method public setLastdocid(Ljava/lang/String;)V
    .locals 0
    .parameter "lastdocid"

    .prologue
    .line 75
    iput-object p1, p0, Lcom/netease/newsreader/activity/MyApplication;->lastdocid:Ljava/lang/String;

    .line 76
    return-void
.end method

.method public setSqlOpenHelper(Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;)V
    .locals 0
    .parameter "sqlOpenHelper"

    .prologue
    .line 21
    iput-object p1, p0, Lcom/netease/newsreader/activity/MyApplication;->sqlOpenHelper:Lcom/netease/newsreader/db/NewsSQLiteOpenHelper;

    .line 22
    return-void
.end method

.method public setVoteId(Ljava/lang/String;)V
    .locals 0
    .parameter "vId"

    .prologue
    .line 157
    iput-object p1, p0, Lcom/netease/newsreader/activity/MyApplication;->voteId:Ljava/lang/String;

    .line 158
    return-void
.end method
